import http from '@/http/index.ts'
import { DeviceGearboxModelQuery, DeviceGearboxModel } from './type'

// 获取减速机列表（分页）
export const getDeviceGearboxModelList = (params: DeviceGearboxModelQuery) => {
  return http.get('/api/device-gearbox-model/page', params)
}

// 获取减速机详情
export const getDeviceGearboxModelDetail = (id: number) => {
  return http.get(`/api/device-gearbox-model/${id}`)
}

// 新增减速机
export const addDeviceGearboxModel = (data: DeviceGearboxModel) => {
  return http.post('/api/device-gearbox-model', data)
}

// 更新减速机
export const updateDeviceGearboxModel = (data: DeviceGearboxModel) => {
  return http.put('/api/device-gearbox-model', data)
}

// 删除减速机
export const deleteDeviceGearboxModel = (id: number) => {
  return http.delete(`/api/device-gearbox-model/${id}`)
} 